package org.example.reflect.demo;

import java.lang.reflect.Field;
import java.util.Arrays;

public class Demo {
    public static void main(String[] args) {

        Field[] declaredFields=ReflectChild.class.getDeclaredFields();
        System.out.println("==================Declared Fields==================");
        Arrays.stream(declaredFields).forEach(o-> System.out.println(o.getName()));

        System.out.println("==================Public Fields==================");
        ReflectChild.class.getFields();
        Arrays.stream(ReflectChild.class.getFields()).forEach(o-> System.out.println(o.getName()));
    }
}
